import express from 'express';
import 'dotenv/config';
import { connectDB } from './db/connect.js';


const app = express();


const port = process.env.PORT || 5000;

const start = async () => {
  try {
    await connectDB(process.env.MONGO_URI);
    app.listen(port, console.log(`server is running at http://localhost:${port}`));
  } catch (err) {
    console.log(err);
  }

}

start();
